<?php

require_once(dm::getDir().'/dmFrontPlugin/lib/config/dmFrontApplicationConfiguration.php');

class frontConfiguration extends dmFrontApplicationConfiguration
{
  public function configure() {
        $this->getEventDispatcher()->connect('dm.bread_crumb.filter_links', array($this, 'listenToBreadCrumbFilterLinksEvent'));
    }
    public function listenToBreadCrumbFilterLinksEvent(sfEvent $e, array $links) {
        // check if the breadcrumb contains a link to the post/list page
        if(isset($links['productCategory/list'])) {
            // if the current page is a post/show page
            // remove the post/list link
            unset($links['productCategory/list']);
        }

        // return the links to the breadcrumb
        return $links;
    }
}